<?php


namespace app\api\validate;

class CartValidate extends BaseValidate
{
    protected $rule = [
        'goods_id' => 'require|isPositiveInteger',
        'num' => 'require|isPositiveInteger',
        'sku_id' => 'require|isPositiveIntegerOrZero',
    ];

    protected $message = [
        'goods_id.require' => '缺少商品ID',
        'goods_id.isPositiveInteger' => '缺少商品ID',
        'num.require' => '购买数量必须大于0',
        'num.isPositiveInteger' => '购买数量必须大于0',
        'sku_id.isPositiveIntegerOrZero' => '请选择商品属性',
        'sku_id.require' => '请选择商品属性',
    ];
}